
#include "base/singleton.h"

namespace test_suite_singleton
{

//USING_NAMESPACE_TANGRAM;

class TestClass : public Singleton<TestClass>
{
public:
	int Foo() { return 2012; }
};

typedef Singleton<TestClass> InstOfTestClass;

TEST(test_base, singleton)
{
	EXPECT_EQ(TestClass::Instance().Foo(), 2012);
	EXPECT_EQ(TestClass::NewInstance().Foo(), 2012);

	EXPECT_EQ(InstOfTestClass::Instance().Foo(), 2012);
	EXPECT_EQ(InstOfTestClass::NewInstance().Foo(), 2012);
}

}